-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[TargetRegistry] Remove deprecated createTargetMachine #161053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TargetRegistry] Remove deprecated createTargetMachine #161053
Conversation
This was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate.
32eaa6c
to
13f984f
Compare
Marking this as a draft for now. I want to land some PRs in downstreams that we import internally first:
EDIT: I've moved over everything internally. I don't think waiting on the last upstream to finish review is super necessary. |
@llvm/pr-subscribers-llvm-mc Author: Aiden Grossman (boomanaiden154) ChangesThis was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate. Full diff: https://github.com/llvm/llvm-project/pull/161053.diff 1 Files Affected:
diff --git a/llvm/include/llvm/MC/TargetRegistry.h b/llvm/include/llvm/MC/TargetRegistry.h
index 019ee602975f7..570d4c0e8d272 100644
--- a/llvm/include/llvm/MC/TargetRegistry.h
+++ b/llvm/include/llvm/MC/TargetRegistry.h
@@ -389,6 +389,7 @@ class Target {
/// @name Feature Constructors
/// @{
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCAsmInfo *createMCAsmInfo(const MCRegisterInfo &MRI, StringRef TheTriple,
const MCTargetOptions &Options) const {
@@ -440,6 +441,7 @@ class Target {
return MCInstrAnalysisCtorFn(Info);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCRegisterInfo *createMCRegInfo(StringRef TT) const {
if (!MCRegInfoCtorFn)
@@ -454,6 +456,7 @@ class Target {
return MCRegInfoCtorFn(TT);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCSubtargetInfo *createMCSubtargetInfo(StringRef TheTriple, StringRef CPU,
StringRef Features) const {
@@ -496,16 +499,6 @@ class Target {
JIT);
}
- [[deprecated("Use overload accepting Triple instead")]]
- TargetMachine *createTargetMachine(
- StringRef TT, StringRef CPU, StringRef Features,
- const TargetOptions &Options, std::optional<Reloc::Model> RM,
- std::optional<CodeModel::Model> CM = std::nullopt,
- CodeGenOptLevel OL = CodeGenOptLevel::Default, bool JIT = false) const {
- return createTargetMachine(Triple(TT), CPU, Features, Options, RM, CM, OL,
- JIT);
- }
-
/// createMCAsmBackend - Create a target specific assembly parser.
MCAsmBackend *createMCAsmBackend(const MCSubtargetInfo &STI,
const MCRegisterInfo &MRI,
@@ -599,6 +592,7 @@ class Target {
return nullptr;
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCRelocationInfo *createMCRelocationInfo(StringRef TT, MCContext &Ctx) const {
return createMCRelocationInfo(Triple(TT), Ctx);
@@ -616,6 +610,7 @@ class Target {
return Fn(TT, Ctx);
}
+ // TODO(boomanaiden154): Remove this function after LLVM 22 branches.
[[deprecated("Use overload accepting Triple instead")]]
MCSymbolizer *
createMCSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo,
|
This was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate.
This was included in the v21 release, so we can reasonably remove it now. Add a TODO for the other functions that have not yet made it into a release. It does not cost much to keep them around until the next release given the small amount of code and should give a little bit of extra time for some downstreams to migrate.